/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';
@import './vars.less';

@rate-prefix-cls: ~'@{css-prefix}rate';

.@{rate-prefix-cls} {
  .component-css-vars-rate();

  display: inline-flex;
  outline: none;

  &:active,
  &:focus {
    outline-width: 0;
  }

  & &__star {
    position: relative;
    display: inline-block;
    font-size: 0px;
    vertical-align: middle;
    text-align: center;
    line-height: 1;
  }

  svg {
    transition: 0.3s;
  }

  svg.hover {
    transform: scale(1.15);
  }

  & &__decimal {
    display: inline-block;
    overflow: hidden;
    font-size: 16px;
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
  }

  & &__text {
    vertical-align: middle;
    margin-left: var(--ti-rate-text-margin-left);
    font-size: var(--ti-rate-text-font-size);
  }

  & &__bottom-text {
    position: relative;
    font-size: var(--ti-rate-bottom-font-size);
    text-align: center;
    text-overflow: clip;
    overflow: hidden;
    margin-top: var(--ti-rate-bottom-margin-top);
  }
}
